/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.admin.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.admin.api.dto.UserInfoParamsDTO;
import com.fuyao.cloud.admin.api.entity.SysUser;
import com.fuyao.cloud.admin.api.entity.SysUserinfo;
import com.fuyao.cloud.admin.api.vo.UserInfoDeptVO;
import com.fuyao.cloud.common.core.util.R;

import java.util.List;
import java.util.Map;


/**
 * 人员信息
 *
 * @author 碎月
 * @date 2021-12-16 10:32:13
 */
public interface SysUserinfoService extends IService<SysUserinfo> {

    R<Map<String,String>> getMobiles(List<String> userNumbers);

    SysUserinfo getUserInfoByUserName(String userName);

    List<Tree<Long>> selectTree();

    /**
     * 更新远程数据库
     * @return
     */
    R updateRemoteDatabase();

    List<UserInfoDeptVO> getUserDetailInfoList(UserInfoParamsDTO userInfoParamsDTO);

    /**
     * 同步oa数据
     * @return
     */
    R syncOaData() throws InterruptedException;

    /**
     * 添加或修改 userinfo
     * @param sysUser 用户对象
     * @return 是否添加或修改成功
     */
    boolean saveOrUpdateUserinfo(SysUser sysUser);

}

